/**
 * Copyright 2010 Tristan Slominski
 *
 * Licensed under the MIT License (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.opensource.org/licenses/mit-license.php
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mindash.handlebars.client.wrappers.impl;

import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.History;
import com.mindash.handlebars.client.wrappers.HistoryWrapper;

/**
 * @author Tristan Slominski
 * 
 */
public class HistoryWrapperImpl implements HistoryWrapper {

  @Override
  public void addValueChangeHandler(ValueChangeHandler<String> handler) {
    History.addValueChangeHandler(handler);
  }

  @Override
  public void back() {
    History.back();
  }

  @Override
  public void fireCurrentHistoryState() {
    History.fireCurrentHistoryState();
  }

  @Override
  public void forward() {
    History.forward();
  }

  @Override
  public String getToken() {
    return History.getToken();
  }

  @Override
  public void newItem(String historyToken) {
    History.newItem(historyToken);
  }

  @Override
  public void newItem(String historyToken, boolean issueEvent) {
    History.newItem(historyToken, issueEvent);
  }

}
